package thinkingJava.chapter15;

import java.util.EnumSet;
import java.util.Set;
import static thinkingJava.chapter15.Sets.*;

public class WatercolorSets {
	public static void main(String[] args) {
		Set<Watercolors> set1 = EnumSet.range(Watercolors.LEMON_YELLOW, Watercolors.PHTHALO_BLUE);
		Set<Watercolors> set2 = EnumSet.range(Watercolors.CERULEAN_BLUE_BLUE, Watercolors.VIRIDRE_HUE);
		System.out.println("set1 " + set1);
		System.out.println("set2 " + set2);
		System.out.println("union(set1,set2) : " + union(set1,set2));
		Set<Watercolors> subset = intersection(set1,set2);
		System.out.println("intersection : " + subset);
		System.out.println("difference(set1,subset) : " + difference(set1, subset));
		System.out.println("difference(set2,subset) : " + difference(set2, subset));
		System.out.println("complement(set1,set2) : " + complement(set1, set2));
	}
}
